package com.set.hashset;

import java.util.HashSet;
import java.util.Set;

public class DuplicateValue {
public static void main(String[] args) {
	String str[]=new String[]{"jhon","deepak","raman","gulam","kalam","raman","deepak","jhon"};
	Set<String> duplicate=new HashSet<String>();
	Set<String> unique=new HashSet<String>();
	for(int i=0;i<str.length;i++){
		if(!unique.add(str[i])){
			duplicate.add(str[i]);
		}
	}
	unique.removeAll(duplicate);
	System.out.println("Unique : "+unique);
	System.out.println("Duplicate : "+duplicate);
}
}
